package com.bw.ppjokeplay.common.bind

import androidx.databinding.BindingAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter

class HomeFeedBind {

    companion object{

        @JvmStatic
        @BindingAdapter(value = ["feedAdapter"])
        fun bindFeedAdapter(recyclerView: RecyclerView,
                            feedAdapter: BaseQuickAdapter<*,*>){
            val manager = LinearLayoutManager(recyclerView.context)
            manager.orientation = LinearLayoutManager.VERTICAL
            recyclerView.layoutManager = manager
            recyclerView.adapter = feedAdapter
        }
    }

}